% !TEX TS-program = xelatex
\documentclass{standalone}

\usepackage{fontspec}
\setsansfont{Arial}
\setmainfont{Comic Sans MS}

\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{positioning}
\usetikzlibrary{matrix}

\definecolor{maryblue}{HTML}{587d9d}
\definecolor{marygray}{HTML}{616360}
\definecolor{maryboxtop}{HTML}{6c747b}
\definecolor{maryboxside}{HTML}{a8adb0}

\newlength{\maryboxdepth}
\setlength{\maryboxdepth}{.2em}

\providecommand{\marybox}[5]{
  \node (tmp) at #5
  [
   draw,
   #4,
   fill=#4,
   text=white,
   rectangle,
   font={\large\sffamily\bfseries},
   minimum width=#2,
   minimum height=#3,
   inner sep=-1em
  ] {#1};
  \fill [maryboxtop] (tmp.north west)
  -- ($(tmp.north west) + (\maryboxdepth,\maryboxdepth)$)
  -- ($(tmp.north east) + (\maryboxdepth,\maryboxdepth)$)
  -- (tmp.north east);
  \fill [maryboxside] (tmp.north east)
  -- ($(tmp.north east) + (\maryboxdepth,\maryboxdepth)$)
  -- ($(tmp.south east) + (\maryboxdepth,\maryboxdepth)$)
  -- (tmp.south east);
}

\begin{document}

\begin{tikzpicture}
  [ttstext/.style={
   text=maryboxtop,
   font={\Large},
   xslant=0.3,
   inner xsep=0.2em,
   inner ysep=0em
  }]

  \matrix (mary)
    [matrix of nodes,
     nodes in empty cells,
     column sep=0.65em,
     row sep=0.65em
    ] {
      & \\
      & \\
    };
  \marybox{M}{1em}{1em}{marygray}{(mary-1-1)}
  \marybox{A}{1em}{1em}{maryblue}{(mary-1-2)}
  \marybox{R}{1em}{1em}{maryblue}{(mary-2-1)}
  \marybox{Y}{1em}{1em}{marygray}{(mary-2-2)}

  \matrix (t)
    [matrix of nodes,
     nodes in empty cells,
     column sep=-.05em,
     row sep=-.05em,
     anchor=west
    ] at ($(mary.east) + (.5em,0)$) {
      & & \\
      & & \\
      & & \\
      & & \\
    };
  \marybox{}{.5em}{.5em}{maryblue}{(t-4-2)}
  \marybox{}{.5em}{.5em}{maryblue}{(t-3-2)}
  \marybox{}{.5em}{.5em}{maryblue}{(t-2-2)}
  \marybox{}{.5em}{.5em}{maryblue}{(t-1-1)}
  \marybox{}{.5em}{.5em}{maryblue}{(t-1-2)}
  \marybox{}{.5em}{.5em}{maryblue}{(t-1-3)}
  \node (text) [ttstext, anchor=mid west] at (t-4-2.east) {ext};

  \matrix (o)
    [matrix of nodes,
     nodes in empty cells,
     column sep=-.05em,
     row sep=-.05em,
     anchor=south west
    ] at ($(t.south east) + (1em,0)$) {
      & & \\
      & & \\
      & & \\
      & & \\
    };
  \marybox{}{.5em}{.5em}{maryblue}{(o-4-2)}
  \marybox{}{.5em}{.5em}{maryblue}{(o-3-2)}
  \marybox{}{.5em}{.5em}{maryblue}{(o-2-2)}
  \marybox{}{.5em}{.5em}{maryblue}{(o-1-1)}
  \marybox{}{.5em}{.5em}{maryblue}{(o-1-2)}
  \marybox{}{.5em}{.5em}{maryblue}{(o-1-3)}
  \node (to) [ttstext, anchor=mid west] at (o-4-2.east) {o};

  \matrix (s)
    [matrix of nodes,
     nodes in empty cells,
     column sep=-.05em,
     row sep=.26em,
     anchor=south west
    ] at ($(o.south east) + (1em,0)$) {
      & & \\
      & & \\
      & & \\
    };
  \marybox{}{.5em}{.5em}{maryblue}{(s-3-1)}
  \marybox{}{.5em}{.5em}{maryblue}{(s-3-2)}
  \marybox{}{.5em}{.5em}{maryblue}{(s-3-3)}
  \marybox{}{.5em}{.8em}{maryblue}{($(s-2-1) + (0,.15em)$)}
  \marybox{}{.5em}{.5em}{maryblue}{(s-2-2)}
  \marybox{}{.5em}{.8em}{maryblue}{($(s-2-3) - (0,.15em)$)}
  \marybox{}{.5em}{.5em}{maryblue}{(s-1-1)}
  \marybox{}{.5em}{.5em}{maryblue}{(s-1-2)}
  \marybox{}{.5em}{.5em}{maryblue}{(s-1-3)}
  \node [ttstext, anchor=mid west] at (s-3-3.east) {peech};
\end{tikzpicture}

\end{document}
